/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Reeks5.VanRansbeeck.Kevin.Model.States.Game;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author sonicah
 */
public class TurnState implements PokerSpelState {
    
    
    public String getStatus() {
        return "Turn";
    }

    public void flop(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Flop kan alleen vanuit pre-flop.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(TurnState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void turn(SpelStateContext aThis) {
       try {
            throw new IllegalGameActionException("Dit is de turn al.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(TurnState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void river(SpelStateContext aThis) {
        aThis.setSpelState(new RiverState());
    }
    
    public void blinds(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Pre-flop gaat enkel vanuit new state.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(TurnState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public void showdown(SpelStateContext aThis) {
        // als alle spelers all-in zijn (of alle spelers -1 all-in zijn)
        aThis.setSpelState(new ShowdownState());
    }
    
    public void winner(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Winnaar kan alleen vanuit showdown state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(TurnState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void reset(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Reset kan alleen vanuit winnaar state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(TurnState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}
